package com.study.selection.dao;

import com.study.selection.model.College;
import com.study.selection.model.Major;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MajorDao {

    List<Major> findAll();

    List<Major> findByKey(String key);

    int addMajor(Major major);

    //根据学院编号获取对象
    List<Major> getByCollegeId(int collegeId);

    //根据专业编号获取对象
    Major getByMajorId(int majorId);

    int updateMajor(Major major);
    // 逻辑删除
    int deleteMajor(int majorId);

}
